﻿using System.Data.Objects;
using Sendz.Domain;

namespace Sendz.Model
{
    class SendzContext : ObjectContext
    {
        public SendzContext() : base("name=SendzEntities", "SendzEntities")
        {
            Forms = CreateObjectSet<Form>();
            FormFields = CreateObjectSet<FormField>();
            FieldTypes = CreateObjectSet<FieldType>();
            Responses = CreateObjectSet<Response>();
            ResponseItems = CreateObjectSet<ResponseItem>();
            AutoResponders = CreateObjectSet<AutoResponder>();
            AutoResponses = CreateObjectSet<AutoResponse>();
            Identities = CreateObjectSet<Identity>();
            Users = CreateObjectSet<User>();
            UserEmailValidations = CreateObjectSet<UserEmailValidation>();
            Attachments = CreateObjectSet<Attachment>();
        }

        public ObjectSet<Form> Forms { get; private set; }
        public ObjectSet<FormField> FormFields { get; private set; }
        public ObjectSet<FieldType> FieldTypes { get; private set; }
        public ObjectSet<Response> Responses { get; private set; }
        public ObjectSet<ResponseItem> ResponseItems { get; private set; }
        public ObjectSet<AutoResponder> AutoResponders { get; private set; }
        public ObjectSet<AutoResponse> AutoResponses { get; private set; }
        public ObjectSet<Identity> Identities { get; private set; }
        public ObjectSet<User> Users { get; private set; }
        public ObjectSet<UserEmailValidation> UserEmailValidations { get; private set; }
        public ObjectSet<Attachment> Attachments { get; private set; }
    }
}
